package com.jianglin.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
/*第三种方法实现更加灵活*/
public class HelloController3 {
    @ResponseBody /*该注解的意思是把结果直接打在控制台*/
    @RequestMapping("/hm31")/*配置地址*/
    public String hello1() {
        return "hello1";
    }
    @ResponseBody /*该注解的意思是把结果直接打在控制台*/
    @RequestMapping("/hm32")/*配置地址*/
    public String hello2() {
        return "hello2";
    }
}
